package com.zhishiku.filesystem.server;

import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.util.Map;
public interface MinioService {

    InputStream getFile(String objectPath) throws Exception;

    /**
     * 文件上传
     * @param file
     * @param fileName
     * @return
     */
    public Map<String,String> uploadFile(MultipartFile file, String fileName);

    /**
     * 文件下载
     */
    public InputStream downloadFile(String fileName, HttpServletResponse response) ;

    /**
     * 删除文件
     * @param bucketName
     * @param fileName
     * @return
     * @throws Exception
     */
    public boolean deleteFile(String bucketName,String fileName);

}
